
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type QrcodeRequest struct {

	ThirdType string `json:"third_type" form:"third_type"`

	ThirdId string `json:"third_id" form:"third_id"`

	Ticket string `json:"ticket" form:"ticket"`

	ExpireSeconds string `json:"expire_seconds" form:"expire_seconds"`

	Status string `json:"status" form:"status"`

	AddTime string `json:"add_time" form:"add_time"`

	Url string `json:"url" form:"url"`

	QrcodeUrl string `json:"qrcode_url" form:"qrcode_url"`

	Scan string `json:"scan" form:"scan"`

	Type string `json:"type" form:"type"`

}

func (r *QrcodeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *QrcodeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"third_type": "required",

		"third_id": "required",

		"ticket": "required",

		"expire_seconds": "required",

		"status": "required",

		"add_time": "required",

		"url": "required",

		"qrcode_url": "required",

		"scan": "required",

		"type": "required",

	}
}

func (r *QrcodeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *QrcodeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *QrcodeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
